﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Libs.Content;

public partial class Pages_Job : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        NewsWeb _NewsWeb = new NewsWeb();
        rptList.DataSource = _NewsWeb.GetList(37, 0, 10);
        rptList.DataBind();
    }

    protected string GetHtml(string _Title, string _Lead, string _Url, string _ImageUrl, DateTime _PublishedTime)
    {
        string s;
        if (_ImageUrl.Length > 0)
        {
            s = Resources.Html.NewsListImg;
            s = s.Replace("$ImageUrl$", AppUtils.ImageUrl(_ImageUrl, "300", "200"));
        }
        else
        {
            s = Resources.Html.NewsList;
        }
        s = s.Replace("$Link$", _Url);
        s = s.Replace("$Title$", _Title + _PublishedTime.ToString(" (dd/MM/yyyy)"));
        s = s.Replace("$Lead$", _Lead);
        s = s.Replace("$Time$", _PublishedTime.ToString("HH'h'mm '|' dd/MM/yyyy"));
        return s;
    }
}